A main task of a router is forwarding a internet protocol (IP) packet, that is, forwarding a packet that arrives at a router input port to a correct egress port according to a destination IP address in a packet header. Route searching is a process of searching a routing table in a router according to a destination IP address of a packet to obtain egress port information of the packet.
With network development, a requirement of a router throughput gradually increases. In the prior art, a method for increasing a router throughput is scaling out (Scale Out), that is, an entire router is constructed by using a plurality of boxes that are stacked. Performance is improved mainly by increasing a quantity of boxes, and a scale effect is easily implemented, so that costs are reduced.
The following describes a scaled-out distributed router and a route searching method in the prior art. The distributed router includes an ingress computing node, a bounce computing node, and an egress computing node. Further, the distributed router may further include another computing node. The ingress computing node receives a network packet, and determines a bounce computing node to which the received network packet is routed. Specifically, the ingress computing node generates a hash key based on a received destination IP address, and hash ciphers are corresponding to different computing nodes (for example, bounce computing nodes) of the distributed router. In this way, after determining a specific bounce computing node, the ingress computing node sends the network packet to the determined bounce computing node without route searching. The bounce computing node determines, based on the destination IP address, a location to which the network packet is routed. Specifically, the bounce computing nodes store different routing entry sets (for example, subsets or parts). The bounce computing node determines a specific egress computing node by using which the network packet leaves from the distributed router.
In the route searching method, routing tables are stored in a distributed manner by using the hash key generated based on the destination IP address, and consequently, a large quantity of routing entries are repeated. In addition, because distributed route searching is performed based on the hash key, a hash (Hash) conflict occurs, an extra mechanism is required to resolve the hash conflict, and a false hit is caused. As a result, entire routing efficiency is relatively low.